package com.base.msg;

import android.support.v4.app.FragmentTransaction;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.base.commonlib.base.CBaseBarMvpActivity;
import com.base.msg.databinding.ActivityMsgBinding;
import com.base.msg.fag.MsgReadFragment;
import com.base.msg.presenter.MsgPresenter;
import com.base.msg.view.MsgView;

/**
 * Created by weikailiang on 2020/2/18.
 */
@Route(path = "/message/massage")
public class MsgActivity extends CBaseBarMvpActivity<MsgPresenter> implements MsgView{
    private ActivityMsgBinding mBinding;
    @Autowired
    String type;//1消息

    @Override
    protected int getLayoutResource() {
        return R.layout.activity_msg;
    }

    @Override
    protected void init() {
        super.init();
        mBinding = (ActivityMsgBinding) mRootBinding;
        mPresenter = new MsgPresenter(this,this);
        mPresenter.start();
        setBackNavigation();
        setBarTitle("消息");
    }

    @Override
    protected void start() {
        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
        transaction.add(R.id.contain, new MsgReadFragment(), MsgReadFragment.class.getName());
        transaction.commitAllowingStateLoss();
    }
}
